<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<script type="text/javascript">
	$(document).ready(function(){
		//增加隔行变色效果 
        $(".listtable").zebra(); 
		//获取菜单图标
		$('#framework_menumodify_comboxicon').combobox({
			data : iconData,
			panelHeight:'auto',
			formatter : function(v) {
				return formatString('<span class="{0}" style="display:inline-block;vertical-align:middle;width:16px;height:16px;"></span>{1}', v.value, v.label);
			}
		});
		//$('#framework_menumodify_comboxicon').combobox('setValue',roleid);
		//获取当前用户所有模块数据
		$('#framework_menumodify_comboxmoudle').combobox({  
    		url:'${pageContext.request.contextPath}/menuAction!getMoudle.action',  
   			valueField:'moudleid',  
  	 		textField:'moudlename',
  	 		required: true,
  	 		panelHeight:'auto',
  	 		onSelect:function(data){  
          	 	$('#framework_menumodify_parentMenuid').combotree({
        			url:'${pageContext.request.contextPath}/menuAction!getAllMenuAdd.action?moudleid='+data.moudleid,
        			parentField : 'pid',
           			lines : true,
           			required: true,
           			onSelect:function(data){
           				var numstr=(new Date()).valueOf(); 
           				var menuid=data.id+"_"+numstr.toString().substring(10);
           				$('#frmaework_menumodify_meunid').val(menuid);
           			}
          	 	 });
  	 		}
  	 		
		}); 
	});
</script>
<form id="framework_menu_editmenuForm" method="post">
 	<table border="0" cellpadding="0" cellspacing="0" height="100%"  width="100%" class="listtable">
    <tr>
      <td height="40px"  style="text-align:right"><span style="color:red;font-size:15px">*</span>菜单名称：&nbsp;</td>
      <td height="40px"><input type="text" id="framework_menumodify_menuname" name="text" class="easyui-validatebox" data-options="required:true,missingMessage:'菜单名称必须填写'" style="width:150px"/></td>
      <td height="40px"  style="text-align:right">菜单图标：&nbsp;</td>
      <td height="40px"><input id="framework_menumodify_comboxicon" name="iconCls" style="width:150px;" /></td>
     </tr>
     <tr>
      <td height="40px"  style="text-align:right">&nbsp;菜单编码：&nbsp;</td>
      <td height="40px">
          <input type="hidden" id="frmaework_menumodify_newid" name="onlyId"/>
          <input type="text" id="frmaework_menumodify_meunid" name="id" class="easyui-validatebox" data-options="required:true,missingMessage:'菜单编码必须填写'" style="width:150px"/>
      </td>
       <td height="40px"  style="text-align:right"><span style="color:red;font-size:15px">*</span>模块名称：&nbsp;</td>
      <td height="40px">
          <input id="framework_menumodify_comboxmoudle" class="easyui-combobox" name="pmoudleid" style="width:150px;"/>
      </td>
     </tr>
      <tr>
      <td height="40px"  style="text-align:right"><span style="color:red;font-size:15px">*</span>上级菜单名称：&nbsp;</td>
      <td height="40px"><input type="text" id="framework_menumodify_parentMenuid" name="pid" style="width:150px" readonly="readonly" /></td>
       <td height="40px"  style="text-align:right">&nbsp;排序：&nbsp;</td>
      <td height="40px"><input id="framework_menumodify_seq" name="menudisorder" class="easyui-numberspinner" data-options="min:1,max:999,editable:true,required:true,missingMessage:'请选择菜单排序'" value=999 style="width:150px;"/></td>
     </tr>
      <tr>
      <td height="40px"  style="text-align:right">&nbsp;启用状态：&nbsp;</td>
      <td height="40px">
        <select id="framework_menumodify_status" class="easyui-combobox" name="status" data-options="required:true"  panelHeight='auto'  style="width:150px;">  
		   	<option value="1" selected>启用</option>  
			<option value="0">未启用</option>   
		</select> 
       <td height="40px"  style="text-align:right">&nbsp;加载方式：&nbsp;</td>
      <td height="40px">
      <select id="framework_menumodify_loadtype" class="easyui-combobox" name="menuloadtype" data-options="required:true,panelHeight:'auto'" style="width:150px;">  
		   	<option value="1" selected>内部系统嵌入</option>  
			<option value="2">内部系统href</option>  
			<option value="3">外部系统</option>
		</select>  
      </td>
     </tr>
    <tr>
        <td height="40px"  style="text-align:right">&nbsp;基础权限：&nbsp;</td>
        <td height="40px" colspan="3">
            <select id="framework_menuadd_basePermission" class="easyui-combobox" name="basePermission" data-options="required:true"  panelHeight='auto'  style="width:150px;">
                <option value="0" selected="selected">否</option>
                <option value="1">是</option>
            </select>
            基础权限只做权限控制使用，不作为菜单使用。
        </td>
    </tr>
     <tr>
      <td height="40px"  style="text-align:right">菜单url路径：&nbsp;</td>
      <td  colspan="3"height="40px"><input type="text" id="framework_menumodify_url" name="url" style="width:435px"/></td>
     </tr> 
    </table>
 	</form>
<script type="text/javascript">
setTimeout("setValueMoudle()",100);
function setValueMoudle(){
	$("#frmaework_menumodify_newid").val($("#frmaework_menumodify_meunid").val());
}
  
</script>